/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tsb.dominio.interfaces;

/**
 *
 * @author Nico
 */
public class LineaTelefonica extends InterfaceDeConeccion
{
    private boolean duplex;
    private boolean detecionAutomaticaAnchoBnadaDuplex;
    private MAC mac;

   public LineaTelefonica()
   {
     super();
   }
   public LineaTelefonica(boolean estado, int anchoDeBanda, IP ip,IP subnetMask, boolean duplex, boolean detecionAutomaticaAnchoBnadaDuplex, MAC mac)
   {
        this.estado= estado;
        this.anchoDeBanda=anchoDeBanda;
        this.ip=ip;
        this.subnetMask=subnetMask;
        this.duplex = duplex;
        this.detecionAutomaticaAnchoBnadaDuplex = detecionAutomaticaAnchoBnadaDuplex;
        this.mac = mac;
   }
   public String toString()
   {
    String cad= "---- Interfaz Linea Telefónica ----" +"\n"+
            super.toString() +
            "Duplex: "+ duplex +"\n"+
            //"MAC: "+ mac.getMac() +"\n"+
            "Deteccion automatica duplex: " +detecionAutomaticaAnchoBnadaDuplex;
            if(this.mac!=null)
            {
                cad+="MAC: "+mac.getMac();
            }

    return cad;
    }

    public IP getIp() {
        return ip;
    }

    public void setIp(IP ip) {
        this.ip = ip;
    }
    public boolean getEstado()
    {
        if(this.estado==true)
        {
            return true;
        }
        else
        {
            return false;
        }
    }
    public int getAnchoDeBanda()
    {
        return this.anchoDeBanda;
    }
   public IP getSubNetMask()
   {
       return this.subnetMask;
   }
   public boolean getDuplex()
   {
       return this.duplex;
   }


    public boolean isDetecionAutomaticaAnchoBnadaDuplex() {
        return detecionAutomaticaAnchoBnadaDuplex;
    }

    public void setDetecionAutomaticaAnchoBnadaDuplex(boolean detecionAutomaticaAnchoBnadaDuplex) {
        this.detecionAutomaticaAnchoBnadaDuplex = detecionAutomaticaAnchoBnadaDuplex;
    }

    public boolean isDuplex() {
        return duplex;
    }

    public void setDuplex(boolean duplex) {
        this.duplex = duplex;
    }

    public MAC getMac() {
        return mac;
    }

    public void setMac(MAC mac) {
        this.mac = mac;
    }
    public void setEstado(boolean aux)
    {
        this.estado=aux;
    }









}
